@import '~/assets/style/vars.less';
@import '~/assets/style/mixin.less';

@base-class: my;

.@{base-class} {
  &-divider {
    margin: 0;
    height: 16px;
    background-color: @color-muted;
  }

  &-head {
  }

  &-slogan {
    height: 80px;
  }

  &-baseInfo {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 8px 88px;
    height: 86px;
  }

  &-avatar {
    position: relative;
    margin: -32px 22px 0 0;
  }

  &-info {
    margin-bottom: 0;
  }

  &-name {
    position: relative;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 22px;
    line-height: 30px;
    /deep/.ant-tag {
      position: absolute;
      top: 4px;
      margin-left: 5px;
      padding: 0 4px;
      background-color: transparent;
      border-color: @color-primary;
      color: @color-primary;
      border-radius: 2px;
      line-height: 16px;
      font-size: 12px;
      opacity: 1;
    }
  }

  &-caps {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    /deep/.cap {
      margin-right: 20px;
    }
  }

  &-action {
    flex: 1;

    &-btn {
      float: right;
    }
  }

  &-body {
    padding-bottom: 40px;
  }

  &-list {
    &-item, &-label, &-value {
      margin-bottom: 0;
    }
    &-item {
      display: flex;
      line-height: 34px;
    }
    &-label {
      margin-right: 60px;
      width: 90px;
      font-weight: 400;
      text-align: right;
      color: @color-concrete;
    }
    &-value {
      flex: 1;
      width: 0;
      /deep/.tags {
        padding-left: 12px;

        .ant-tag {
          margin: 0 0 0 12px;
        }
      }
    }
  }

  &-description {
    max-height: 272px;
    overflow: auto;
  }

  // 有动态
  // ---
  &-has-moments {
    background-color: transparent;

    .@{base-class} {
      &-divider {
        height: 1px;
        background-color: #EEEEEE;
      }

      &-head {
        height: auto;
      }

      &-baseInfo {
        flex-direction: column;
        padding: 30px;
        height: auto;
      }

      &-avatar {
        margin: 0 0 12px;
      }

      &-info {
        margin-bottom: 20px;
      }

      &-name {
        text-align: center;
      }

      &-caps {
        /deep/.cap {
          margin-right: 10px;
          margin-left: 10px;
        }
      }

      &-body {
        /deep/.card-content {
          padding: 30px;

          .ant-card {
            &-head {
              &-title {
                padding-bottom: 20px;
                font-size: 20px;
                text-align: center;
              }
            }
          }
        }
      }

      &-list {
        &-label {
          margin-right: 3px;
          width: 80px;
        }
        &-value {
          /deep/.tags {
            padding-left: 0;

            .ant-tag {
              margin-left: 6px;
            }
          }
        }
      }
    }
  }

  // 我的动态
  // ---
  .change-layout-btn {
    padding: 0 15px;
  }
  &-moments {
    &-list {
      margin-bottom: 15px;
    }
    &-item {
      margin-bottom: 25px;
      &:last-child {
        margin-bottom: 0;
      }
    }
    &-sider {
      margin-right: 10px;
      min-width: 20px;
    }
    &-main {
      p {
        margin-bottom: 0;
      }
    }
    &-head {
      margin-bottom: 8px;
      /deep/.flex-item {
        margin-right: 15px;
        &:last-child {
          margin-right: 0;
        }
      }
    }
    &-body {
      padding: 8px 10px;
      background-color: @color-muted;
      color: @color-concrete;
    }
    &-title {
      margin-bottom: 6px;
    }
    &-thumb {
      margin-right: 12px;

      &, img {
        width: 84px;
        height: 47px;
        border-radius: 4px;
      }
      img {
        display: block;
      }
    }
    &-time {
      font-size: 12px;
      color: @color-lights;
    }
    &-foot {
      margin-top: 2px;
      line-height: 34px;
    }

    /deep/.card-content {
      padding: 30px 42px;

      .ant-card {
        &-extra {
          margin-top: -2px;
        }
      }
    }
  }

  /deep/.ant {
    &-pagination {
      margin: 0 -11px 5px 0;
      text-align: right;
    }
  }

  // 修改个人资料
  // ---
  &-profile {
    &-view {
      margin-bottom: 8px;
    }

    &-submit {
      float: right;
    }

    /deep/.ant {
      &-form {
        &-item {
          display: flex;
          &-label {
            margin-right: 42px;
            width: 90px;
            text-align: right;
            > label {
              color: @color-concrete;
            }
          }
          &-control {
            &-wrapper {
              flex: 1;
            }
          }
          &-required {
            &:before {
              display: none;
            }
          }
        }
      }
    }

    /deep/.comment-textarea {
      textarea.ant-input {
        min-height: 76px;
      }

      &-explain {
        padding: 0 8px;
        height: 34px;
      }
    }
  }
}
